home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5943 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: bcarh8ab.bnr.ca!hwt
  2. From: hwt@bnr.ca (Henry Troup)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How to get a random string each time??
  5. Date: 21 Feb 1996 22:04:35 GMT
  6. Organization: Northern Telecom Nortel Broadband Networks, Ottawa, Canada
  7. Message-ID: <4gg4tj$s18@bcarh8ab.bnr.ca>
  8. References: <4fh5od$qq0@news.nevada.edu> <4g4c5m$tlb@news.nevada.edu>
  9. Reply-To: hwt@bnr.ca
  10. NNTP-Posting-Host: bcarhd7b.bnr.ca
  11.  
  12. In article <4g4c5m$tlb@news.nevada.edu>,
  13. Clapton Chan <chancl@nevada.edu> wrote:
  14. ...
  15. >     for(i=0; i<10; i++) {
  16. ...
  17. >        if...
  18. >           break;
  19. >    }
  20. ...
  21. >    j = j%i;  /* this handles early program exit */
  22.  
  23. I know a couple of people who would jump up and down and yell about
  24. access to a loop index variable outside of the loop.  And I know a
  25. language that made it impossible.
  26.  
  27. I guess in C this is well defined, but it's still on my private list of
  28. things not to do again.
  29. -- 
  30.  Henry Troup - hwt@bnr.ca (Canada) - Nortel is not committed to anything I say
  31.    Leap years are years where the year number is a multiple of four with the
  32. exception: If a year is a multiple of 100, then it is only a leap year if it
  33. is also a multiple of 400. For example, 1900 was not a leap year, but 2000 is.
  34.